<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   肖楠的回复  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript">
   MathJax.Hub.Config({elements: ["bbpress-forums"]});
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://cos.name/cn/profile/107675/replies/page/87/",
                  host: "http://cos.name",
                  prePath: "http://cos.name",
                  scheme: "http",
                  pathBase: "http://cos.name/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466462705: Accept with keywords: (title(0.0):论坛, topn(0.266666666667):单值,插件,分类,RSS订阅,帖子,作者,精度,统计表,用户名,结果,主站,新鲜事,选择性,收藏夹,中移,置信区间,变量,回归,用户,密码,全部,版主,感知机,主题,程序,总计,论坛,分类器,讨论区,总和).-->
 </head>
 <body class="bbp-user-page single singular bbpress paged-87 single-author sidebar" onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    肖楠的回复
   </h1>
  </div>
  <div class="container" id="xmain">
   <div class="hfeed site" id="page">
    <header class="site-header" id="masthead" role="banner">
     <div id="cos-logo">
      <a href="http://cos.name/cn">
       <img src="http://cos.name/cn/wp-content/themes/COS-forest/images/headers/cos-logo.png"/>
      </a>
     </div>
     <div class="navbar" id="navbar">
      <nav class="navigation main-navigation" id="site-navigation" role="navigation">
       <h3 class="menu-toggle">
        菜单
       </h3>
       <div class="menu-%e8%8f%9c%e5%8d%951-container">
        <ul class="nav-menu" id="menu-%e8%8f%9c%e5%8d%951">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-407772" id="menu-item-407772">
          <a href="http://cos.name/cn/">
           论坛首页
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407773" id="menu-item-407773">
          <a href="http://cos.name/cn/forums/">
           讨论区
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407774" id="menu-item-407774">
          <a href="http://cos.name/cn/wp-login.php?action=register">
           注册
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407819" id="menu-item-407819">
          <a href="http://cos.name/">
           主站
          </a>
         </li>
        </ul>
       </div>
      </nav>
      <!-- #site-navigation -->
     </div>
     <!-- #navbar -->
    </header>
    <!-- #masthead -->
    <div class="site-main" id="main">
     <div class="content-area" id="primary">
      <div class="site-content" id="content" role="main">
       <article class="post-0 type- status-publish hentry" id="post-0">
        <header class="entry-header">
         <h1 class="entry-title">
          肖楠
         </h1>
        </header>
        <!-- .entry-header -->
        <div class="entry-content">
         <div id="bbpress-forums">
          <div id="bbp-user-wrapper">
           <div id="bbp-single-user-details">
            <div id="bbp-user-avatar">
             <span class="vcard">
              <a class="url fn n" href="http://cos.name/cn/profile/107675/" rel="me" title="肖楠">
               <img src="http://sdn.geekzu.org/avatar/66aa115466aeedf71937ff80c00b7982?s=150&amp;d=monsterid&amp;r=g"/>
              </a>
             </span>
            </div>
            <!-- #author-avatar -->
            <div id="bbp-user-navigation">
             <ul>
              <li class="">
               <span class="vcard bbp-user-profile-link">
                <a class="url fn n" href="http://cos.name/cn/profile/107675/" rel="me" title="肖楠的档案">
                 档案
                </a>
               </span>
              </li>
              <li class="">
               <span class="bbp-user-topics-created-link">
                <a href="http://cos.name/cn/profile/107675/topics/" title="肖楠发起的主题">
                 发起的主题
                </a>
               </span>
              </li>
              <li class="current">
               <span class="bbp-user-replies-created-link">
                <a href="http://cos.name/cn/profile/107675/replies/" title="肖楠创建的回复">
                 创建的回复
                </a>
               </span>
              </li>
              <li class="">
               <span class="bbp-user-favorites-link">
                <a href="http://cos.name/cn/profile/107675/favorites/" title="肖楠的收藏夹">
                 收藏夹
                </a>
               </span>
              </li>
             </ul>
            </div>
            <!-- #bbp-user-navigation -->
           </div>
           <!-- #bbp-single-user-details -->
           <div id="bbp-user-body">
            <div class="bbp-user-replies-created" id="bbp-user-replies-created">
             <h2 class="entry-title">
              回复的主题
             </h2>
             <div class="bbp-user-section">
              <div class="bbp-pagination">
               <div class="bbp-pagination-count">
                查看 15 个帖子 - 1,291 到 1,305（总计 2,892 个）
               </div>
               <div class="bbp-pagination-links">
                <a class="prev page-numbers" href="http://cos.name/cn/profile/107675/replies/page/86/">
                 ←
                </a>
                <a class="page-numbers" href="http://cos.name/cn/profile/107675/replies/">
                 1
                </a>
                <span class="page-numbers dots">
                 …
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/107675/replies/page/86/">
                 86
                </a>
                <span class="page-numbers current">
                 87
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/107675/replies/page/88/">
                 88
                </a>
                <span class="page-numbers dots">
                 …
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/107675/replies/page/193/">
                 193
                </a>
                <a class="next page-numbers" href="http://cos.name/cn/profile/107675/replies/page/88/">
                 →
                </a>
               </div>
              </div>
              <ul class="forums bbp-replies" id="topic-0-replies">
               <li class="bbp-header">
                <div class="bbp-reply-author">
                 作者
                </div>
                <!-- .bbp-reply-author -->
                <div class="bbp-reply-content">
                 帖子
                </div>
                <!-- .bbp-reply-content -->
               </li>
               <!-- .bbp-header -->
               <li class="bbp-body">
                <div class="bbp-reply-header" id="post-335536">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2012年8月4日 下午3:24
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/107669/">
                    tikzDevice被从CRAN中移除了！
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/107669/#post-335536">
                   2 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-335536 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-107669 bbp-reply-position-2 user-id-107675 post-335536 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   <img src="http://sdn.geekzu.org/avatar/66aa115466aeedf71937ff80c00b7982?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   肖楠
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   版主
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   这两位作者的 pgfSweave 也一样，前两天还招人维护来着
                  </p>
                  <p>
                   <a href="http://cameron.bracken.bz/who-wants-to-maintain-pgfsweave" rel="nofollow">
                    http://cameron.bracken.bz/who-wants-to-maintain-pgfsweave
                   </a>
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-335521">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2012年8月4日 上午6:15
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/107630/">
                    选择性失明
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/107630/#post-335521">
                   9 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-335521 -->
                <div class="even bbp-parent-forum-988 bbp-parent-topic-107630 bbp-reply-position-9 user-id-107675 post-335521 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   <img src="http://sdn.geekzu.org/avatar/66aa115466aeedf71937ff80c00b7982?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   肖楠
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   版主
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   回复 第8楼 的 谢益辉：
                  </p>
                  <p>
                   可以（目前限于 bbPress 1.x）。
                  </p>
                  <p>
                   <a href="http://vanillaforums.com/blog/help/importing-data/" rel="nofollow">
                    http://vanillaforums.com/blog/help/importing-data/
                   </a>
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-335520">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2012年8月4日 上午6:10
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/107596/">
                    logistic回归
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/107596/#post-335520">
                   6 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-335520 -->
                <div class="odd bbp-parent-forum-993 bbp-parent-topic-107596 bbp-reply-position-6 user-id-107675 post-335520 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   <img src="http://sdn.geekzu.org/avatar/66aa115466aeedf71937ff80c00b7982?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   肖楠
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   版主
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   bbPress 2.x 成了 WordPress 的一个插件了？！
                  </p>
                  <p>
                   怪不得 /en/ 有一种奇怪的赶脚 。。。
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-335510">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2012年8月3日 上午9:54
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/107663/">
                    如何调节RStudio默认图片输出的分辨率？
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/107663/#post-335510">
                   2 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-335510 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-107663 bbp-reply-position-2 user-id-107675 post-335510 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   <img src="http://sdn.geekzu.org/avatar/66aa115466aeedf71937ff80c00b7982?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   肖楠
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   版主
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   用函数输出。
                  </p>
                  <p>
                   那个窗口主要是做预览的，参数设定能力有限。DPI都设不了。
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-335509">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2012年8月3日 上午9:31
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/107582/">
                    求助，R能不能直接读取网站上的年鉴或月度统计表
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/107582/#post-335509">
                   5 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-335509 -->
                <div class="odd bbp-parent-forum-990 bbp-parent-topic-107582 bbp-reply-position-5 user-id-107675 post-335509 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   <img src="http://sdn.geekzu.org/avatar/66aa115466aeedf71937ff80c00b7982?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   肖楠
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   版主
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                  </p>
                  <pre class="highlight ">require(XML)
require(RCurl)
pg1 = 'http://fuzhou.customs.gov.cn/publish/portal123/tab39441/module21195/page1.htm'
pg2 = 'http://fuzhou.customs.gov.cn/publish/portal123/tab39441/module21195/page2.htm'
pg3 = 'http://fuzhou.customs.gov.cn/publish/portal123/tab39441/module21195/page3.htm'
url1 = htmlTreeParse(pg1, useInternal = TRUE)
url2 = htmlTreeParse(pg2, useInternal = TRUE)
url3 = htmlTreeParse(pg3, useInternal = TRUE)
urls1 = unlist(xpathApply(url1, path = "//td[@width='81%']//a", xmlGetAttr, "href"))
urls2 = unlist(xpathApply(url2, path = "//td[@width='81%']//a", xmlGetAttr, "href"))
urls3 = unlist(xpathApply(url3, path = "//td[@width='81%']//a", xmlGetAttr, "href"))[1:18]
urls = c(urls1, urls2, urls3)
subpage = getURIAsynchronous(urls)
subpage = lapply(subpage, htmlParse, asText = TRUE, encoding = 'utf-8')
num = vector('numeric')
for (i in 1:length(urls)) {
  num[i] = xmlValue(getNodeSet(doc = subpage[[i]],
                               path = "//tbody//tr//td[@align='right']")[[7]])
}
as.numeric(num)
#  [1] 853748 902361 857044 790004 768103 739519 725246 649049 404036 759120 737251
# [12] 647507 580390 614395 612146 693975 622930 592834 571778 485672 445540 546648
# [23] 570929 473495 463263 520837 464895 493134 448495 411770 403945 387954 247721
# [34] 447646 463540 425932 493237 517111 538998 526606 481722 491564 508951 439320
# [45] 349813 463458 502048 469083 433273 451939 427186 415441 397339 318752 333626
# [56] 423604 483545 394661
</pre>
                  <p>
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-335490">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2012年8月2日 下午6:57
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/107272/">
                    做分类时，某些变量中只有一个值，是否可以将这些变量直接全部剔除？
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/107272/#post-335490">
                   13 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-335490 -->
                <div class="even bbp-parent-forum-1006 bbp-parent-topic-107272 bbp-reply-position-13 user-id-107675 topic-author post-335490 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   <img src="http://sdn.geekzu.org/avatar/66aa115466aeedf71937ff80c00b7982?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   肖楠
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   版主
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   回复 第12楼 的 micro@： Yeah it’s clear now. [s:19] Indeed they should be the same theoretically, but in practice, we should be very careful touching these variables, because it could possibly lower the performance due to our idiomatic modeling procedures.
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-335488">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2012年8月2日 下午3:49
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/107272/">
                    做分类时，某些变量中只有一个值，是否可以将这些变量直接全部剔除？
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/107272/#post-335488">
                   11 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-335488 -->
                <div class="odd bbp-parent-forum-1006 bbp-parent-topic-107272 bbp-reply-position-11 user-id-107675 topic-author post-335488 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   <img src="http://sdn.geekzu.org/avatar/66aa115466aeedf71937ff80c00b7982?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   肖楠
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   版主
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   回复 第10楼 的 micro@： For k-NN and trees, it would be no difference. For we could treat them as the recursive partitioning for some certain spaces, the ‘constant variable’ could not influence the distance computation, at least under Minkovski distances.
                  </p>
                  <p>
                   I think I figured out the SVM problem. The RBF kernel parameter
                   <code>
                    gamma
                   </code>
                   was determined automatically by data dimensionality, so the results are different.
                  </p>
                  <p>
                   But when specified the same certain
                   <code>
                    gamma
                   </code>
                   , the three SVM training results turned to be all identical. [s:14] That’s a bit confusing …
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-335486">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2012年8月2日 下午2:54
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/107651/">
                    如何编写R的程序，使其能够后项减前项，并且最终求出所有后项减前项的总和？
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/107651/#post-335486">
                   12 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-335486 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-107651 bbp-reply-position-12 user-id-107675 post-335486 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   <img src="http://sdn.geekzu.org/avatar/66aa115466aeedf71937ff80c00b7982?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   肖楠
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   版主
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   回复 第11楼 的 micro@：
                  </p>
                  <p>
                   Suspect that some underlying implementation interfered the result. We have to inspect the lower level.
                  </p>
                  <p>
                   Actually, the multiple precision floatingpoint is extremely slow (at least with Rmpfr) :
                  </p>
                  <p>
                  </p>
                  <pre class="highlight ">require(Rmpfr)
x0 = 1.234
y0 = 9.876
x1 = mpfr(1.234, 100)
y1 = mpfr(9.876, 100)
system.time(
  for (i in 1:10000) {
    invisible(x0 + y0)
    }
)
# 用户  系统  流逝
# 0.010 0.000 0.009 
system.time(
  for (i in 1:10000) {
    invisible(x1 + y1)
    }
)
# 用户   系统   流逝
# 12.769  0.006 12.940 
# 12.940/0.009
# [1] 1437.7778
</pre>
                  <p>
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-335464">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2012年8月1日 下午3:42
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/107272/">
                    做分类时，某些变量中只有一个值，是否可以将这些变量直接全部剔除？
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/107272/#post-335464">
                   9 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-335464 -->
                <div class="odd bbp-parent-forum-1006 bbp-parent-topic-107272 bbp-reply-position-9 user-id-107675 topic-author post-335464 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   <img src="http://sdn.geekzu.org/avatar/66aa115466aeedf71937ff80c00b7982?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   肖楠
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   版主
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   回复 第8楼 的 micro@： Are there any counterexamples? [s:16] .. when zero intercept is inequivalent to no intercept …
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-335463">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2012年8月1日 下午3:32
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/107651/">
                    如何编写R的程序，使其能够后项减前项，并且最终求出所有后项减前项的总和？
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/107651/#post-335463">
                   10 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-335463 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-107651 bbp-reply-position-10 user-id-107675 post-335463 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   <img src="http://sdn.geekzu.org/avatar/66aa115466aeedf71937ff80c00b7982?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   肖楠
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   版主
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   回复 第7楼 的 micro@：
                  </p>
                  <p>
                   Seems a bit different starting from 1e-16 …
                  </p>
                  <p>
                   Error:
                   <br/>
                   kahan_fast = regular_fast &lt; kahan_diff &lt; regular_diff
                  </p>
                  <p>
                  </p>
                  <pre class="highlight ">options(digits = 22)
set.seed(1001)
x = sample(1/2:101, 50)
kahan &lt;- function (input) {
  sum = 0.0
  c   = 0.0
  for (i in 1:length(input)) {
    y   = input[i] - c
    t   = sum + y
    c   = (t - sum) - y
    sum = t
  }
  return(sum)
}
require(Rmpfr)
set.seed(1001)
mpx = mpfr(sample(1/2:101, 50), 100)
## Concrete result using mpfr
sum(diff(mpx))
# 0.0156410256410256399278724259716
mpx[length(mpx)] - mpx[1]
# 0.0156410256410256399278724259716
## Kahan's summation
y = rep(NA, 49)
for (i in 1:49) y[i] = kahan(c(-x[i], x[i + 1]))
mpfr(kahan(y), 100)
# 0.015641025641025631254255046087565
mpfr(kahan(c(x[length(x)], -x[1])), 100)
# 0.015641025641025638193148949994793
## Regular summation
mpfr(sum(diff(x)), 100)
# 0.015641025641025624315361142180336
mpfr(x[length(x)] - x[1], 100)
# 0.015641025641025638193148949994793
</pre>
                  <p>
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-335451">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2012年8月1日 上午11:56
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/107272/">
                    做分类时，某些变量中只有一个值，是否可以将这些变量直接全部剔除？
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/107272/#post-335451">
                   7 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-335451 -->
                <div class="odd bbp-parent-forum-1006 bbp-parent-topic-107272 bbp-reply-position-7 user-id-107675 topic-author post-335451 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   <img src="http://sdn.geekzu.org/avatar/66aa115466aeedf71937ff80c00b7982?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   肖楠
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   版主
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   做了个小实验，的确有影响。而且似乎和这个取值是否非零无关，和分类器的原理有关。之前的想法有误。
                  </p>
                  <p>
                   对于 SVM, 不论单值变量取值是否非 0, 不去掉时，结果相同。去掉后，精度就有下降。看来对于利用了感知机这样想法的分类器，只要有单值的变量，无论取值是多少，都需要注意。
                  </p>
                  <p>
                   对于树，零或非零，去不去掉，结果都完全一样。
                  </p>
                  <p>
                  </p>
                  <pre class="highlight ">require(mlbench)
require(caret)
set.seed(1001)
p  = mlbench.threenorm(100, 10)
x  = p$x
x0 = cbind(x, matrix(0, 100, 5))
x8 = cbind(x, matrix(8, 100, 5))
y  = p$classes
levels(y) = c('x1', 'x2')
fitControl = trainControl(method  = "repeatedcv",
                          number  = 5,
                          repeats = 5)
set.seed(1001)
svm_na = train(x, y, metric = 'Accuracy', trControl = fitControl,
               method = 'svmRadial', scaled = FALSE)
# 0.820
set.seed(1001)
svm_0 = train(x0, y, metric = 'Accuracy', trControl = fitControl,
              method = 'svmRadial', scaled = FALSE)
# 0.828
set.seed(1001)
svm_8 = train(x8, y, metric = 'Accuracy', trControl = fitControl,
              method = 'svmRadial', scaled = FALSE)
# 0.828
set.seed(1001)
tree_na = train(x, y, metric = 'Accuracy', trControl = fitControl,
               method = 'rpart')
# 0.602
set.seed(1001)
tree_0 = train(x0, y, metric = 'Accuracy', trControl = fitControl,
              method = 'rpart')
# 0.602
set.seed(1001)
tree_8 = train(x8, y, metric = 'Accuracy', trControl = fitControl,
              method = 'rpart')
# 0.602
</pre>
                  <p>
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-335444">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2012年8月1日 上午9:22
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/107272/">
                    做分类时，某些变量中只有一个值，是否可以将这些变量直接全部剔除？
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/107272/#post-335444">
                   6 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-335444 -->
                <div class="even bbp-parent-forum-1006 bbp-parent-topic-107272 bbp-reply-position-6 user-id-107675 topic-author post-335444 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   <img src="http://sdn.geekzu.org/avatar/66aa115466aeedf71937ff80c00b7982?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   肖楠
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   版主
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   回复 第5楼 的 tangboyun： 很好的例子！
                  </p>
                  <p>
                   不过我这里是一种常见的情况： 整体很稀疏，大量 0, 少量 1, 单值变量都是 0.
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-335425">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2012年7月31日 下午11:14
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/107651/">
                    如何编写R的程序，使其能够后项减前项，并且最终求出所有后项减前项的总和？
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/107651/#post-335425">
                   4 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-335425 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-107651 bbp-reply-position-4 user-id-107675 post-335425 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   <img src="http://sdn.geekzu.org/avatar/66aa115466aeedf71937ff80c00b7982?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   肖楠
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   版主
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   虽然符号推导是等价的，但是考虑到
                   <strong>
                    数值精度
                   </strong>
                   ，结果是不同滴。后者可能更准确一点。
                  </p>
                  <p>
                  </p>
                  <pre class="highlight ">options(digits=22)
set.seed(1001)
x = sample(1/2:101, 50)
sum(diff(x))
# 0.01564102564102562431536
x[length(x)] - x[1]
# 0.01564102564102563819315
</pre>
                  <p>
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-335332">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2012年7月30日 上午6:36
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/107631/">
                    回归分析得到预测值的置信区间如何算？
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/107631/#post-335332">
                   2 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-335332 -->
                <div class="even bbp-parent-forum-991 bbp-parent-topic-107631 bbp-reply-position-2 user-id-107675 post-335332 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   <img src="http://sdn.geekzu.org/avatar/66aa115466aeedf71937ff80c00b7982?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   肖楠
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   版主
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                  </p>
                  <pre class="highlight ">lmfit = lm(eruptions ~ waiting, data = faithful)
newdata = data.frame(waiting = 60)
predict(lmfit, newdata, interval = 'confidence', level = 0.95)
#        fit      lwr      upr
# 1 2.663661 2.587644 2.739678
</pre>
                  <p>
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-335326">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2012年7月30日 上午5:13
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/107630/">
                    选择性失明
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/107630/#post-335326">
                   6 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-335326 -->
                <div class="odd bbp-parent-forum-988 bbp-parent-topic-107630 bbp-reply-position-6 user-id-107675 post-335326 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   <img src="http://sdn.geekzu.org/avatar/66aa115466aeedf71937ff80c00b7982?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/107675/" rel="nofollow" title="查看肖楠的档案">
                   肖楠
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   版主
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   bbPress does have that plugin:
                   <br/>
                   <a href="http://wordpress.org/extend/plugins/bbpress-ignore-user/" rel="nofollow">
                    http://wordpress.org/extend/plugins/bbpress-ignore-user/
                   </a>
                  </p>
                  <p>
                   Vanilla has the addon, too:
                   <br/>
                   <a href="http://cos.name/cn/topic/107596#post-235190" rel="nofollow">
                    http://cos.name/cn/topic/107596#post-235190
                   </a>
                   <br/>
                   <a href="http://vanillaforums.org/addon/ignoreuser-plugin" rel="nofollow">
                    http://vanillaforums.org/addon/ignoreuser-plugin
                   </a>
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
               </li>
               <!-- .bbp-body -->
               <li class="bbp-footer">
                <div class="bbp-reply-author">
                 作者
                </div>
                <div class="bbp-reply-content">
                 帖子
                </div>
                <!-- .bbp-reply-content -->
               </li>
               <!-- .bbp-footer -->
              </ul>
              <!-- #topic-0-replies -->
              <div class="bbp-pagination">
               <div class="bbp-pagination-count">
                查看 15 个帖子 - 1,291 到 1,305（总计 2,892 个）
               </div>
               <div class="bbp-pagination-links">
                <a class="prev page-numbers" href="http://cos.name/cn/profile/107675/replies/page/86/">
                 ←
                </a>
                <a class="page-numbers" href="http://cos.name/cn/profile/107675/replies/">
                 1
                </a>
                <span class="page-numbers dots">
                 …
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/107675/replies/page/86/">
                 86
                </a>
                <span class="page-numbers current">
                 87
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/107675/replies/page/88/">
                 88
                </a>
                <span class="page-numbers dots">
                 …
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/107675/replies/page/193/">
                 193
                </a>
                <a class="next page-numbers" href="http://cos.name/cn/profile/107675/replies/page/88/">
                 →
                </a>
               </div>
              </div>
             </div>
            </div>
            <!-- #bbp-user-replies-created -->
           </div>
          </div>
         </div>
        </div>
        <!-- .entry-content -->
        <footer class="entry-meta">
        </footer>
        <!-- .entry-meta -->
       </article>
       <!-- #post -->
      </div>
      <!-- #content -->
     </div>
     <!-- #primary -->
     <div class="sidebar-container" id="tertiary" role="complementary">
      <div class="sidebar-inner">
       <div class="widget-area">
        <aside class="widget bbp_widget_login" id="bbp_login_widget-2">
         <h3 class="widget-title">
          登录
         </h3>
         <form action="http://cos.name/cn/wp-login.php" class="bbp-login-form" method="post">
          <fieldset>
           <legend>
            登录
           </legend>
           <div class="bbp-username">
            <label for="user_login">
             用户名:
            </label>
           </div>
           <div class="bbp-password">
            <label for="user_pass">
             密码:
            </label>
           </div>
           <div class="bbp-remember-me">
            <label for="rememberme">
             记住用户名
            </label>
           </div>
           <div class="bbp-submit-wrapper">
            <button class="button submit user-submit" id="user-submit" name="user-submit" tabindex="104" type="submit">
             登录
            </button>
           </div>
           <div class="bbp-login-links">
            <a class="bbp-register-link" href="http://cos.name/cn/wp-login.php?action=register" title="注册">
             注册
            </a>
            <a class="bbp-lostpass-link" href="http://cos.name/cn/wp-login.php?action=lostpassword" title="忘记密码">
             忘记密码
            </a>
           </div>
          </fieldset>
         </form>
        </aside>
        <aside class="widget widget_text" id="text-7">
         <h3 class="widget-title">
          搜索
         </h3>
         <div class="textwidget">
          <form action="http://www.google.com/search" id="bbp-search-form" method="get" onsubmit="Gsitesearch(this)" role="search">
           <div>
           </div>
          </form>
          <form id="bbp-search-form-baidu" onsubmit="g(this)" role="search">
           <div>
           </div>
          </form>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-2">
         <h3 class="widget-title">
          新鲜事
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            <a href="http://cos.name/cn/topics/">
             最新帖子
            </a>
           </li>
           <li>
            <a href="http://cos.name/cn/view/popular/">
             最热门主题
            </a>
           </li>
           <li>
            <a href="http://cos.name/cn/view/no-replies/">
             消灭零回复
            </a>
           </li>
          </ul>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-3">
         <h3 class="widget-title">
          RSS订阅
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            <img src="http://cos.name/wp-includes/images/rss.png"/>
            <a href="http://cos.name/cn/topics/feed/">
             所有主题
            </a>
           </li>
           <li>
            <img src="http://cos.name/wp-includes/images/rss.png"/>
            <a href="http://cos.name/cn/forums/feed/">
             所有帖子
            </a>
           </li>
          </ul>
         </div>
        </aside>
       </div>
       <!-- .widget-area -->
      </div>
      <!-- .sidebar-inner -->
     </div>
     <!-- #tertiary -->
    </div>
    <!-- #main -->
    <footer class="site-footer" id="colophon" role="contentinfo">
     <div class="site-info">
      版权所有 © 2014 统计之都 | 由
      <a href="http://wordpress.org/">
       WordPress
      </a>
      构建 | 主题修改自
      <a href="http://wordpress.org/themes/twentythirteen">
       Twenty Thirteen
      </a>
     </div>
     <!-- .site-info -->
    </footer>
    <!-- #colophon -->
   </div>
   <!-- #page -->
  </div>
 </body>
</html>